<!--<?php
$houseSaleModule = $_viewer->houseSaleModule;
$userInfo = $_viewer->houseSaleModule->userinfo;
if($houseSaleModule->isurgent){$isurgent='';}else{$isurgent='none';};
$brokerModule = $_viewer->brokerModule;
$username = '';
if($_viewer->ifbroker){
	$username = $brokerModule->realname;
}else{
	$username = $houseSaleModule->linkman;
	$username = $username ? $username : $houseSaleModule->userinfo['username'];
}
$localUrl = $_viewer->baseUrl.'&a=houseinfo&houseid='.$_viewer->houseid;
print <<<EOT
-->
<script src="mode/house/js/second.js"></script>
<script type="text/javascript">
jQuery(function(){
    /*------房源图片最宽600---------------------*/
    var maxwidth = 600;
    jQuery(".pic-info img").each(function(){
       if(jQuery(this).width()>maxwidth)jQuery(this).width(maxwidth)
    })
})
</script>
<div id="main">
		<div class="crumbs">
			<em>您现在的位置：</em>
			<ul>
				<li><a href="index.php?m=house">房产</a></li>
				<li><a href="{$_viewer->baseUrl}">二手房</a></li>
				<li><a href="{$_viewer->baseUrl}&options=opt.areatype.{$houseSaleModule->areatype}">{$houseSaleModule->areatypename}</a></li>
				<li>{$houseSaleModule->village}二手房</li>
			</ul>
		</div>
		<div class="cc">
			<div class="fl w-750">
				<div class="house-summary">
					<h1>
						<img class="icon-img" src="mode/house/images/sendhand/lifeline.png" style="display:{$isurgent}" width="45" height="20" alt="急" />	
						{$houseSaleModule->subject}
					</h1>
					<div class="cc">
						<div id="SH_player">
<!--
EOT;
if($_viewer->secondImages){print <<<EOT
-->							
							<div id="pwSlidePlayer" class="pwSlide cc" onmouseover="pwSlidePlayer('pause');" onmouseout="pwSlidePlayer('goon');">
<!--
EOT;
foreach($_viewer->secondImages as $key=>$value){
$identify = (int)$key+1;
print <<<EOT
-->								
								<div id="Switch_{$identify}" style="">
									<a href="javascript:void(0)">
										<img class="pwSlideFilter" src="$value[path]" />	
									</a>
								</div>
<!--
EOT;
}print <<<EOT
-->													
								<ul id="SwitchNav"></ul>
								<span class="pwSlide-bg"></span>
							</div>
							<script type="text/javascript" src="js/picplayer.js"></script>
						    <script>pwSlidePlayer('play',1,5);</script>
<!--
EOT;
}else{
print <<<EOT
-->	
								<div class="pwSlide">
									<img class="pwSlideFilter" src="{$_viewer->modeImagePath}/nopic_300x250.png" />	
								</div>	
							
<!--
EOT;
}
$buildtime = $houseSaleModule->buildtime ? $houseSaleModule->buildtime.'年' : '';
$floor = $houseSaleModule->currentfloor && $houseSaleModule->totalfloor ? '第'.$houseSaleModule->currentfloor.'层(共'.$houseSaleModule->totalfloor.'层)' : '';
print <<<EOT
-->									
		
							<p class="tips">如果该房源内容虚假，
								<a  href="javascript:;" onclick="setHandler('index.php?m=house&q=sale','{$_viewer->houseid}','','report')">请点击这里举报</a>
							</p>
						</div>
						
						<div class="property">
							<p class="infos">
							<span class="action">
							<a onclick="sendmsg('operate.php?action=toweibo&ajax=1&type=sale&id={$_viewer->houseid}','',this.id);" href="javascript:;"  title="发送到新鲜事" class="Bus_Forward">新鲜事</a> / 
							<a href="javascript:window.print()">打印本页</a>
							</span>发布时间：{$houseSaleModule->posttime[1]}（{$houseSaleModule->modifytime[0]}更新）</p>
							<ul class="attr data">
								<li class="price"><span class="t">售　　价：</span><em>{$houseSaleModule->price}</em>万元 ( <a href="index.php?m=house&q=calculate&housetype=sale" target="_blank">房贷计算器</a> )</li>
								<li><span class="t">单　　价：</span>{$houseSaleModule->unitprice}元/平米</li>
								<li><span class="t">建筑面积：</span><em>{$houseSaleModule->acreage}</em> 平米</li>
							</ul>
							<ul class="attr">
								<li><span class="t">地　　址：</span>{$houseSaleModule->address}</li>
								<li class="l"><span class="t">小区名称：</span>{$houseSaleModule->village}</li>
								<li class="r"><span class="t">装　　修：</span>{$houseSaleModule->fitmentname}</li>
								<li class="l"><span class="t">楼　　层：</span>{$floor}</li>
								<li class="r"><span class="t">物业类型：</span>{$houseSaleModule->housetypename}</li>
								<li class="l"><span class="t">户　　型：</span>{$houseSaleModule->roomname}</li>
								<li class="r"><span class="t">建筑年代：</span>{$buildtime}</li>
								<li class="clear"><span class="t">产权性质：</span>{$houseSaleModule->rightername}</li>
								<li><span class="t">配套设施：</span>{$houseSaleModule->equipmentname}</li>
							</ul>
<!--
EOT;
$brokerphone = $brokerModule->phone ? $brokerModule->phone : $brokerModule->tel;
$housephone = $houseSaleModule->phone ? $houseSaleModule->phone : $houseSaleModule->tel;
$phone = $_viewer->ifbroker ? $brokerphone : $housephone;
$phone = $phone ? $phone : $brokerphone;
print <<<EOT
-->								
							<p class="tel">联系电话：{$phone}</p>
						</div>
					</div>
				</div>
				<div class="house-detail">
					<ul class="tabbar">
						<li class="current"><a>房源详细信息</a></li>
						<li><a href="{$localUrl}#houseimg">房源图片</a></li>
					</ul>
					<div class="bd">
						{$houseSaleModule->descrip}
					</div>
					
					<div class="hd">
						<h3 id="houseimg">房源图片</h3>
						<a href="{$localUrl}#" class="go-top">返回顶部</a>
					</div>
					<div class="bd">
<!--
EOT;
if($houseSaleModule->attachs){
print <<<EOT
-->						
						<ul class="pic-info">
<!--
EOT;
foreach($houseSaleModule->attachs as $key=>$value){
print <<<EOT
-->						
							<li>
							<img src="{$value[path]}" />
							<p>{$value[descrip]}</p>
							</li>
<!--
EOT;
}print <<<EOT
-->								
						</ul>
<!--
EOT;
}print <<<EOT
-->						
					</div>
				</div>
			</div>
			
			<div class="fr w-200">
<!--
EOT;
$url = PW_HouseUrl::secondSale();
if(isHouseManager($houseSaleModule->uid,'sale')){
print <<<EOT
-->				
				<div class="manage">
					<p class="options">
						<a class="option" href="javascript:;" onclick="setHandler('{$_viewer->baseUrl}','{$_viewer->houseid}','','urgent')">加急</a>
						<a class="option" href="javascript:;" onclick="setHandler('{$_viewer->baseUrl}','{$_viewer->houseid}','','top')">置顶</a>
						<a class="option" href="javascript:;" onclick="setHandler('{$_viewer->baseUrl}','{$_viewer->houseid}','','delete',function(){
							showDialog('success', '删除成功', 2,function(){});
							window.setTimeout(function(){window.location.href='{$url}'}, 2000);
						})">删除</a>
						<a class="option" href="index.php?m=house&q=manage&a=addsale&houseid={$_viewer->houseid}&from=info" >编辑</a>
					</p>
				</div>
<!--
EOT;
}if($_viewer->ifbroker){
	$url = "index.php?m=house&q=shop&uid={$houseSaleModule->uid}";
}else{
	$url = "u.php?uid={$userInfo[uid]}";
}
print <<<EOT
-->					
				<div id="promulgatorInfo" class="house-tools mb10">
					<div class="person">
						<div class="pho">
							<a href="u.php?uid={$userInfo[uid]}"><img src="{$userInfo[faceurl][0]}" height="120" /></a>
						</div>
						<p class="name">
							<a href="$url">{$username}</a>
<!--							
EOT;
if ($_viewer->showonline) {
if (checkOnline($userInfo['thisvisit'])){print <<<EOT
--><img src="{$_viewer->imgpath}/online.png" title="在线" alt="在线" class="icon-img" />
<!--
EOT;
} else {print<<<EOT
--><img src="{$_viewer->imgpath}/stealth.png" title="离线" alt="离线" class="icon-img" />
<!--
EOT;
}
}print <<<EOT
-->							
						</p>
						<p><a onclick="return ajaxurl(this);" href="pw_ajax.php?action=msg&touid={$userInfo[uid]}">向发布人提问</a></p>
					</div>
					<div class="infos">
<!--
EOT;
if(!$_viewer->ifbroker){
print <<<EOT
-->
						<p class="tac" style="margin-top:-5px;">普通个人用户</p>
<!--
EOT;
}
$display = 'none';
if($_viewer->ifbroker){
$display = '';
print <<<EOT
-->							
						<ul class="attr">
							<li><span class="t">注册时间：</span>{$userInfo[regdate]}</li>	
							<li><span class="t">认证类型：</span>{$brokerModule->newverypic}</li>
							<li><span class="t">所属公司：</span><em>{$brokerModule->company}</em></li>
							<li><span class="t">服务商圈：</span><em>{$brokerModule->newplate}</em></li>
						</ul>
<!--
EOT;
}print <<<EOT
-->													
						<div class="action" style="display:$display">
						<a class="btn-store" href="index.php?m=house&q=shop&uid={$houseSaleModule->uid}">进入经纪人店铺</a>
						</div>
					</div>
				</div>
<!--
EOT;
if($_viewer->browseSaleHouse){
print <<<EOT
-->					
				<div class="house-tools mb10">
					<div class="hd">
						<h3>最近浏览过的房源</h3>
					</div>					
					<div class="bd">
						<ul class="list-house-pic">
<!--
EOT;
foreach($_viewer->browseSaleHouse as $key=>$value){
print <<<EOT
-->							
							
							
							<li>
								<p><a href="$_viewer->baseUrl&a=houseinfo&houseid={$value[houseid]}">{$value[village]} {$value[room]}</a></p>
								<p><em class="price">{$value[price]}</em>万元 &nbsp;{$value[acreage]}平米</p>	
							</li>
<!--
EOT;
}print <<<EOT
-->							

						</ul>
					</div>				
				</div>	
<!--
EOT;
}if($_viewer->similarSaleHouse){
print <<<EOT
-->													
				<div class="house-tools mb10">
					<div class="hd">
						<h3>周边相似的房源 </h3>
					</div>					
					<div class="bd">
						<ul class="list-house-pic">
						
<!--
EOT;
foreach($_viewer->similarSaleHouse as $key=>$value){
print <<<EOT
-->							<li>
								<h4><a href="$_viewer->baseUrl&a=houseinfo&houseid={$value[houseid]}">{$value[village]} {$value[room]}</a></h4>
								<div class="cc">
									<div class="pic">
									<img src="{$value[thumb]}" width="50" height="50" />
									</div>
									<p><em class="price">{$value[price]}</em>万元</p>
									<p>{$value[acreage]}平米</p>
									<p>{$value[fitment]}</p>
								</div>
							</li>
							
<!--
EOT;
}print <<<EOT
-->	
						</ul>
					</div>					
				</div>
				
<!--
EOT;
}if($_viewer->ifbroker && $_viewer->lastUpdateHouse){
print <<<EOT
-->					
				<div class="house-tools mb10">
					<div class="hd">
						<h3>经纪人推荐房源</h3>
					</div>					
					<div class="bd">
						<ul class="list-house-pic">
<!--
EOT;
foreach($_viewer->lastUpdateHouse as $key=>$value){
print <<<EOT
-->												
							<li>
								<p><a href="$_viewer->baseUrl&a=houseinfo&houseid={$value[houseid]}">{$value[village]} {$value[room]}</a></p>
								<p><em class="price">{$value[price]}</em>万元 &nbsp;{$value[acreage]}平米</p>	
							</li>
<!--
EOT;
}print <<<EOT
-->														
						</ul>
					</div>				
				</div>		
<!--
EOT;
}
print <<<EOT
-->	
				<div class="house-tools tools-box mb10">
					<div class="hd">
						<h3>购房工具</h3>
					</div>
<!--
EOT;
portalEcho('saleutility');
print <<<EOT
-->
				</div>
			</div>
		</div>
</div>					


<!--
EOT;
?>-->